import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/readme',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            children:[
                {
                    path: '/',
                    component: resolve => require(['../components/page/Readme.vue'], resolve)
                },
                {
                    path: '/basetable',
                    component: resolve => require(['../components/page/BaseTable.vue'], resolve)
                },
                {
                    path: '/configtable',
                    component: resolve => require(['../components/page/ConfigTable.vue'], resolve)     // vue-datasource组件
                },
                {
                    path: '/leveltable',
                    component: resolve => require(['../components/page/LevelTable.vue'], resolve)
                },
                {
                    path: '/payordertable',
                    component: resolve => require(['../components/page/PayorderTable.vue'], resolve)    // Vue-Quill-Editor组件
                },
                {
                    path: '/qrcodetable',
                    component: resolve => require(['../components/page/QrcodeTable.vue'], resolve)     // Vue-Quill-Editor组件
                },
                {
                    path: '/readme',
                    component: resolve => require(['../components/page/Readme.vue'], resolve)     // Vue-Quill-Editor组件
                },
                {
                    path: '/abouttable',
                    component: resolve => require(['../components/page/aboutTable.vue'], resolve)     // Vue-Quill-Editor组件
                },
                {
                    path: '/noticetable',
                    component: resolve => require(['../components/page/noticeTable.vue'], resolve)     // Vue-Quill-Editor组件
                },
                {
                    path: '/suggesttable',
                    component: resolve => require(['../components/page/suggestTable.vue'], resolve)     // Vue-Quill-Editor组件
                }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
    ]
})
